<template>
  <div class="optionLog-component">
    <!-- <div class="title-container">
      <div class="left">
        <p class="title-con"><span>操作日志</span></p>
      </div>
    </div> -->
    <ul class="log-ul">
      <li v-for="(item,index) in logData" :key="index" class="log-li">
        <div class="pic-container">
          <el-image class="pic" :src="item.image">
            <div
              slot="error"
              class="image-slot"
              style="width:100%;height:100%;display:flex;justify-content:center;align-items:center;"
            >
              <i class="el-icon-user-solid" style="font-size:24px;color:#666;" />
            </div>
          </el-image>
        </div>
        <div class="log-container">
          <div class="user-info-container">
            <div class="user-info">
              <span>{{ item.user_name }}</span><span>--{{ item.department_name }}</span>
            </div>
            <div class="time">{{ item.operation_time }}</div>
            <div class="time" style="margin-left:10px"><a class="status-color10" @click="toD(item.flow_id)">{{item.SerialNumber}}</a></div>
          </div>
          <ul class="log">
            <li class="log-item">{{ item.operation_content }}</li>
          </ul>
        </div>
      </li>
    </ul>
    <!-- <pagination
      v-show="total>10"
      style="display:flex;justify-content:flex-end;"
      :total="total"
      :page.sync="queryData.pager.skip"
      :limit.sync="queryData.pager.limit"
      @pagination="afreshLogList"
    /> -->
  </div>
</template>

<script>
import { history } from '@/api/stability/change'
export default {
 
  props: {
    Id: {
      type: String,
      default: () => {}
    }
  },
  data() {
    return {
      total: 0,
      logData: [],
      queryData: {
        id: this.projectId,
        // pager: {
        //   limit: 10,
        //   skip: 1,
        //   order_by: '',
        //   OrderMethod: -1
        // }
      }
    }
  },
  // 生命周期 - 创建完成（访问当前this实例）
  created() {
    console.log(this.Id)
    this.getLogList(this.Id)
  },
  methods: {
    toD(id){
      this.$router.push({name:'changeDetailss',query:{f_id:id}});
    },
    getLogList(data) {
      history(data).then(res => {
        if (res.code === 200) {
          this.logData = res.data.data || []
          // this.total = res.data.total
        }
      })
    },
    afreshLogList() {
    //   this.getLogList(this.queryData)
     }
  }
}
</script>
<style lang="scss" scoped>
/* @import url(); 引入css类 */
@import "@/assets/scss/views/projectInfomation/details/modules/optionLog.scss";
</style>
